Quản lý website giới thiệu và bán điện thoại di động ASP.net
19.281 lượt xem;
- quenmatkhau.aspx.cs
- project /
1 using System;
2 using System.Collections;
3 using System.Configuration;
4 using System.Data;
5 using System.Linq;
6 using System.Web;
7 using System.Web.Security;
8 using System.Web.UI;
9 using System.Web.UI.HtmlControls;
10 using System.Web.UI.WebControls;
11 using System.Web.UI.WebControls.WebParts;
12 using System.Xml.Linq;
13 using System.Data.OleDb;
14
15 public partial class quenmatkhau : System.Web.UI.Page
16 {
17 protected void Page_Load(object sender, EventArgs e)
18 {
19
20 }
21 protected void btntimmk_Click(object sender, EventArgs e)
22 {
23 if (txtten.Text != "")
24 {
25 if (txtemail.Text != "")
26 {
27 if (txtdc.Text != "")
28 {
29 ado.ketNoi();
30 string query = "select * from tbluser where hoten='" + txtten.Text + "' and email='" + txtemail.Text + "' and diachi='" + txtdc.Text + "'";
31 ado.rd = ado.getData(query);
32 lbthongbao.Visible = true;
33 if (ado.rd.Read())
34 {
35 lbthongbao.Text = "Mật khẩu của bạn là: " + ado.rd[1].ToString();
36 }
37 else
38 {
39 lbthongbao.Text = "Không tồn tại tài khoản này!";
40 }
41 ado.rd.Close();
42 ado.dongKetNoi();
43 }else lbthongbao.Text = "Chưa nhập địa chỉ";
44 }
45 else lbthongbao.Text = "Chưa nhập Email";
46 }
47 else lbthongbao.Text = "Chưa nhập Tên";
48 }
49 }
2 using System.Collections;
3 using System.Configuration;
4 using System.Data;
5 using System.Linq;
6 using System.Web;
7 using System.Web.Security;
8 using System.Web.UI;
9 using System.Web.UI.HtmlControls;
10 using System.Web.UI.WebControls;
11 using System.Web.UI.WebControls.WebParts;
12 using System.Xml.Linq;
13 using System.Data.OleDb;
14
15 public partial class quenmatkhau : System.Web.UI.Page
16 {
17 protected void Page_Load(object sender, EventArgs e)
18 {
19
20 }
21 protected void btntimmk_Click(object sender, EventArgs e)
22 {
23 if (txtten.Text != "")
24 {
25 if (txtemail.Text != "")
26 {
27 if (txtdc.Text != "")
28 {
29 ado.ketNoi();
30 string query = "select * from tbluser where hoten='" + txtten.Text + "' and email='" + txtemail.Text + "' and diachi='" + txtdc.Text + "'";
31 ado.rd = ado.getData(query);
32 lbthongbao.Visible = true;
33 if (ado.rd.Read())
34 {
35 lbthongbao.Text = "Mật khẩu của bạn là: " + ado.rd[1].ToString();
36 }
37 else
38 {
39 lbthongbao.Text = "Không tồn tại tài khoản này!";
40 }
41 ado.rd.Close();
42 ado.dongKetNoi();
43 }else lbthongbao.Text = "Chưa nhập địa chỉ";
44 }
45 else lbthongbao.Text = "Chưa nhập Email";
46 }
47 else lbthongbao.Text = "Chưa nhập Tên";
48 }
49 }